package cn.elegent.lock.config;


import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;

/**
 * consul的配置类
 */
@Configuration
@ConditionalOnProperty(prefix = "elegent.lock",name = "type",havingValue = "redis")
@Data
public class RedisLockConfig extends LockConfig{
    /**
     * 主机ip
     */
    @Value("${elegent.lock.host:127.0.0.1}")
    private String host;

    /**
     * 主机端口
     */
    @Value("${elegent.lock.port:6379}")
    private int port;



}
